package com.its.common.net.server.handler;

import com.its.common.net.core.dto.GenericNetDTO;
import com.its.common.net.core.handler.BaseGenericHandler;
import com.its.common.net.core.handler.BaseUdpHandler;
import com.its.common.net.server.channel.SocketAddrManager;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.socket.DatagramPacket;
import lombok.extern.slf4j.Slf4j;
import java.net.InetSocketAddress;

/**
 * @Author xiaxp
 * @Date 9/14/22 16:31
 * @Description
 */
@Slf4j
public abstract class BaseServerUdpHandler extends BaseUdpHandler {

    public BaseServerUdpHandler() {
        netHandlerExecutor = ServerHandlerExecutor.getInstance();
        socketAddrManager = SocketAddrManager.getInstance();
    }


    @Override
    public abstract void handleData(ChannelHandlerContext ctx, GenericNetDTO<DatagramPacket> data);
}
